import 'package:auto_route/auto_route.dart';
import 'package:auto_route/auto_route_annotations.dart';
import 'package:tender_flutter/init/splash.dart';
import 'package:tender_flutter/page/common/page/image_browse_page.dart';
import 'package:tender_flutter/page/goods/goods_detail_page.dart';
import 'package:tender_flutter/page/home/army_child_page.dart';
import 'package:tender_flutter/page/home/army_page.dart';
import 'package:tender_flutter/page/home/city_page.dart';
import 'package:tender_flutter/page/home/company/company_change_page.dart';
import 'package:tender_flutter/page/home/company/company_investment_page.dart';
import 'package:tender_flutter/page/home/company/company_master_page.dart';
import 'package:tender_flutter/page/home/customer_service_page.dart';
import 'package:tender_flutter/page/home/home_page.dart';
import 'package:tender_flutter/page/home/menu/article_detail_page.dart';
import 'package:tender_flutter/page/home/menu/article_dynamic_page.dart';
import 'package:tender_flutter/page/home/menu/certificate_detail_page.dart';
import 'package:tender_flutter/page/home/menu/certificate_search_page.dart';
import 'package:tender_flutter/page/home/menu/company_detail_page.dart';
import 'package:tender_flutter/page/home/menu/company_search_page.dart';
import 'package:tender_flutter/page/home/menu/credit_list_Page.dart';
import 'package:tender_flutter/page/home/menu/credit_search_page.dart';
import 'package:tender_flutter/page/home/menu/market_detail_page.dart';
import 'package:tender_flutter/page/home/menu/market_publish_page.dart';
import 'package:tender_flutter/page/home/menu/market_search_page.dart';
import 'package:tender_flutter/page/home/menu/ppp_search_page.dart';
import 'package:tender_flutter/page/home/menu/publish_success_page.dart';
import 'package:tender_flutter/page/home/menu/tender_search_page.dart';
import 'package:tender_flutter/page/home/menu/winbid_search_page.dart';
import 'package:tender_flutter/page/home/railway_page.dart';
import 'package:tender_flutter/page/home/search_list_page.dart';
import 'package:tender_flutter/page/home/search_page.dart';
import 'package:tender_flutter/page/home/tender_detail_page.dart';
import 'package:tender_flutter/page/index_page.dart';
import 'package:tender_flutter/page/login/phone_login_page.dart';
import 'package:tender_flutter/page/person/about_page.dart';
import 'package:tender_flutter/page/person/apply_invoice_page.dart';
import 'package:tender_flutter/page/person/consumption_page.dart';
import 'package:tender_flutter/page/person/feedback_page.dart';
import 'package:tender_flutter/page/person/inviate_binding_Page.dart';
import 'package:tender_flutter/page/person/invitate_page.dart';
import 'package:tender_flutter/page/person/member_centre_page.dart';
import 'package:tender_flutter/page/person/news_page.dart';
import 'package:tender_flutter/page/person/payment_page.dart';
import 'package:tender_flutter/page/person/person_collection_page.dart';
import 'package:tender_flutter/page/person/person_info_page.dart';
import 'package:tender_flutter/page/person/person_market.dart';
import 'package:tender_flutter/page/person/protocol_page.dart';
import 'package:tender_flutter/page/person/setting_page.dart';
import 'package:tender_flutter/page/person/tixian_history_page.dart';
import 'package:tender_flutter/page/person/tixian_page.dart';
import 'package:tender_flutter/page/subscription/subscription_child_list_page.dart';
import 'package:tender_flutter/page/subscription/subscription_create_page.dart';
import 'package:tender_flutter/page/supplier/supplier_add_certificate_page.dart';
import 'package:tender_flutter/page/supplier/supplier_certificate_list_page.dart';
import 'package:tender_flutter/page/supplier/supplier_detail_page.dart';
import 'package:tender_flutter/page/supplier/supplier_join_page.dart';
import 'package:tender_flutter/page/supplier/supplier_list_more_page.dart';
import 'package:tender_flutter/page/supplier/supplier_search_page.dart';
import 'package:tender_flutter/page/track/track_add_page.dart';
import 'package:tender_flutter/page/track/track_dynamic_page.dart';

import 'guards/login_guard.dart';

///页面路由映射表
@CupertinoAutoRouter(
  // transitionsBuilder: TransitionsBuilders.slideLeft,
  // durationInMilliseconds: 400,
  routes: <AutoRoute>[
    AutoRoute(page: SplashPage),
    AutoRoute(page: MainHomePage),
    AutoRoute(page: TabHomePage),
    AutoRoute(page: PhoneLoginPage),
    AutoRoute(page: CustomerServicePage),
    AutoRoute(page: RailwayPage),
    AutoRoute(page: ArmyPage),
    AutoRoute(page: ArmyChildPage),
    AutoRoute(page: CityPage),
    AutoRoute(page: SearchPage),
    AutoRoute(page: SearchListPage),
    AutoRoute(page: TenderDetailPage, guards: [LoginGuard]),
    AutoRoute(page: TenderSearchPage),
    AutoRoute(page: WinBidSearchPage),
    AutoRoute(page: PPPSearchPage),
    AutoRoute(page: CompanySearchPage, guards: [LoginGuard]),
    AutoRoute(page: CompanyDetailPage, guards: [LoginGuard]),
    AutoRoute(page: CompanyInvestmentPage),
    AutoRoute(page: CompanyMasterPage),
    AutoRoute(page: CompanyChangePage),
    AutoRoute(page: CreditSearchPage, guards: [LoginGuard]),
    AutoRoute(page: CreditListPage),
    AutoRoute(page: CertificateSearchPage, guards: [LoginGuard]),
    AutoRoute(page: CertificateDetailPage, guards: [LoginGuard]),
    AutoRoute(page: MarketSearchPage),
    AutoRoute(page: MarketDetailPage, guards: [LoginGuard]),
    AutoRoute(page: PublishSuccessPage),
    CustomRoute(
        page: ImageBrowsePage, transitionsBuilder: TransitionsBuilders.fadeIn),
    AutoRoute(page: MarketPulishPage, guards: [LoginGuard]),
    AutoRoute(page: ArtcleDynamicPage),
    AutoRoute(page: ArticleDetailPage),
    AutoRoute(page: SupplierJoinPage, guards: [LoginGuard]),
    AutoRoute(page: SupplierListMorePage),
    AutoRoute(page: SubscriptionListPage),
    AutoRoute(page: SupplierDetailPage, guards: [LoginGuard]),
    AutoRoute(page: SubscriptionCreatePage, guards: [LoginGuard]),
    AutoRoute(page: SupplierCertificateListPage, guards: [LoginGuard]),
    AutoRoute(page: SupplierAddCertificatePage, guards: [LoginGuard]),
    AutoRoute(page: SupplierSearchPage),
    AutoRoute(page: TrackAddPage, guards: [LoginGuard]),
    AutoRoute(page: TrackDynamicPage, guards: [LoginGuard]),
    AutoRoute(page: PersonInfoPage, guards: [LoginGuard]),
    AutoRoute(page: TiXianHistoryPage, guards: [LoginGuard]),
    AutoRoute(page: TiXianPage, guards: [LoginGuard]),
    AutoRoute(page: ApplyInvoicePage, guards: [LoginGuard]),
    AutoRoute(page: SettingPage),
    AutoRoute(page: GoodsDetailPage),
    AutoRoute(page: FeedbackPage, guards: [LoginGuard]),
    AutoRoute(page: ProtocolPage),
    AutoRoute(page: ConsumptionPage, guards: [LoginGuard]),
    AutoRoute(page: NewsPage, guards: [LoginGuard]),
    AutoRoute(page: PersonMarketPage, guards: [LoginGuard]),
    AutoRoute(page: PersonCollectionPage, guards: [LoginGuard]),
    AutoRoute(page: MemberCentrePage, guards: [LoginGuard]),
    AutoRoute(page: InviatePage, guards: [LoginGuard]),
    AutoRoute(page: InviateBindingPage, guards: [LoginGuard]),
    AutoRoute(page: PaymentPage, guards: [LoginGuard]),
    AutoRoute(page: AboutPage),
  ],
)
class $RouterMap {
  /**
   * 自动生成命令
   * flutter packages pub run build_runner build
   */
}

// Widget slideRightTransition(BuildContext context, Animation<double> animation,
//     Animation<double> secondaryAnimation, Widget child) {
//   var curvedAnim = CurvedAnimation(parent: animation, curve: Curves.easeInOut);
//   return new SlideTransition(
//     position: new Tween<Offset>(
//       begin: const Offset(1.0, 0.0),
//       end: Offset.zero,
//     ).animate(curvedAnim),
//     child: child,
//   );
// }
